projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2890cd8
)
builder: Don't add profiler marks for short parses
author
Alexander Larsson
<alexl@redhat.com>
Wed, 12 Feb 2020 11:42:29 +0000
(12:42 +0100)
committer
Alexander Larsson
<alexl@redhat.com>
Wed, 12 Feb 2020 11:42:29 +0000
(12:42 +0100)
There are a lot of thes (since we're recursing), so don't spew the
output with uninteresting ones.
gtk/gtkbuilderparser.c
patch
|
blob
|
history
diff --git
a/gtk/gtkbuilderparser.c
b/gtk/gtkbuilderparser.c
index 1aea5c2799e0c8ff7af23afd29804f69ecda7ccf..5440100b7f80c364a87dd9f6515061b69b2ed036 100644
(file)
--- a/
gtk/gtkbuilderparser.c
+++ b/
gtk/gtkbuilderparser.c
@@
-1625,5
+1625,10
@@
_gtk_builder_parser_parse_buffer (GtkBuilder *builder,
/* restore the original domain */
gtk_builder_set_translation_domain (builder, domain);
- gdk_profiler_end_mark (before, "builder load", filename);
+ if (GDK_PROFILER_IS_RUNNING)
+ {
+ guint64 after = g_get_monotonic_time ();
+ if (after - before > 500)
+ gdk_profiler_add_mark (before, after - before, "builder load", filename);
+ }
}